﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TVProgramAnalyst.ReportForm
{
    public partial class frmReport : Form
    {
        public frmReport()
        {
            InitializeComponent();
        }


        private void Form1_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
        }

        public void RefreshReport(string reportServer, string reportPath)
        {
            reportViewer1.ServerReport.ReportServerUrl = new Uri(reportServer);
            reportViewer1.ServerReport.ReportPath = reportPath;
            this.reportViewer1.RefreshReport();
            txtReportServerUri.Text = reportServer;
        }

        private void btnRefresh_Click(object sender, EventArgs e)
        {
            RefreshReport(txtReportServerUri.Text, reportViewer1.ServerReport.ReportPath);
        }
    }
}
